// 分页数据
export class PaginationClass {
    page: number = 1;//当前页数
    limit: number = 10;//每页显示的数量
    total: number = 0;//总条数
}

// 管理员数据
export class AdminUserClass {
    id?: number = 0;
    password: string = '';//密码
    username: string = '';//用户名
    phone: string = '';//手机号
    realname: string = '';//真实姓名
    roleIds: number[] = [];//角色
}

// 优惠券数据
export class CouponClass {
    id?: number;
    title: string = '';//优惠券标题
    type: string | undefined = undefined;//优惠券类别，如满减
    description: string = '';//优惠券描述
    total: number = 0;//优惠券总数
    limit: number = 0;//用户限制领取
    discount: number = 0;//优惠价格
    min: number = 0;//满足优惠的最低价格
    status: number | string | undefined;//优惠券状态
    categoryId: number | undefined;//优惠类别
    days: number | undefined | null;//优惠时长
    gmtStart: number | undefined;//优惠开始时间
    gmtEnd: number | undefined;//优惠结束时间
}

// 广告管理数据
export class AdvertClass {
    id?: number; //广告id
    imgUrl: string | undefined; //广告图片地址
    title: string | undefined; //广告标题
    type: number | undefined;//广告类型
    unionType: number | undefined = undefined;//关联类型
    unionValue: number = 0;//关联值
    status: number = 1;//广告状态
    /**
     * 背景色
     */
    color: string | null = null;//广告图片颜色
    gmtCreate: number | null = null;
    gmtUpdate: number | null = null;
}

// 团购商品数据
export class GroupClass {
    id?: number | undefined;
    spuId: number | undefined;
    minPrice: number | undefined;
    maxPrice: number | undefined;
    gmtStart: number | undefined;//团购开始时间戳
    gmtEnd: number | undefined;//团购结束时间戳
    minNum: number = 1;//团购最低人数
    buyerNum: number | undefined;
    automaticRefund: number | undefined = 0;//团购人数未满是否自动退款
    groupShopSkuDTOList: TypeGroupShopsku[] = [];//团购sku表
    originalPrice: number | undefined;
    price: number | undefined;
    vipPrice: number | undefined;
    title: string | undefined;
    sales: number | undefined;
    img: string | undefined;
    detail: string | undefined;
    description: string | undefined;
    categoryId: number | undefined;
    freightTemplateId: number | undefined;
    unit: string | undefined;
    status: number | undefined;
}

//商品列表数据
export class GoodsClass {
    id: number | undefined = undefined;
    activityId: number | undefined = undefined;
    activityType: number | undefined = undefined;
    categoryId: number | undefined = undefined;
    description: string | undefined = undefined;
    freightTemplateId: string | undefined = undefined;
    gmtActivityEnd: number | undefined = undefined;
    gmtActivityStart: number | undefined = undefined;
    gmtCreate: number | undefined = undefined;
    gmtUpdate: number | undefined = undefined;
    stock: number = 0;//剩余库存
    img: string | undefined = undefined;
    originalPrice: number | undefined = undefined;//吊牌价
    price: number | undefined = undefined;//原始价
    vipPrice: number | undefined = undefined;//vip价
    sales: number | undefined = undefined;
    status: number | undefined = 1;
    title: string | undefined = undefined;//商品名称
    unit: string | undefined = undefined;
    detail: string = '';
    imgList: Array<any> = [];
    skuList: SkuClass[] = [];//商品(sku)详情
    attributeList: attributeType[] = [];//商品参数数组
    specificationList: specificationType[] = [];//规格维度数组
}

// 商品(sku)详情类型
export class SkuClass {
    id?: number | undefined = undefined;
    titleArray: string[] = [];//规格维度所有标题 [红色，S,棉花]
    barCode: string | undefined = undefined;//条形码
    gmtCreate?: number | undefined = undefined;
    gmtUpdate?: number | undefined = undefined;
    img: string | undefined = undefined;//sku图片
    originalPrice: number | undefined = undefined;//吊牌价
    price?: number | undefined = undefined;//原价
    specification: string | undefined = undefined;
    specificationArray: string[] = []; //规格维度[颜色_红色，尺寸_S，面料_棉花]
    spuId?: number | undefined = undefined;
    stock: number | undefined = undefined;//库存
    title?: string | undefined = undefined;
    vipPrice: number | undefined = undefined;//VIP价
    weight?: number | undefined = undefined;//重量
}

/**
 * 标签类型
 */
export class TagClass {
    name: string | undefined = '';
    fullPath: string = '';
    title: string | undefined = '';
    constructor(fullPath: string, title: string, name: string,) {
        this.fullPath = fullPath;
        this.title = title;
        this.name = name;
    }
}